import React, { useRef } from 'react'

export default function list() {
    const divBtn = useRef()
    return (
        <div>
            <span onClick={() => {
                divBtn.style.display = 'block'
            }}>点击</span>
            <div style={{display:'none'}} ref={divBtn}>
                <span onClick={() => {
                    divBtn.style.display = 'none'
                }}>关闭</span>
            </div>
        </div>
    )
}
